import request from '@/utils/request2'

// 查询用户角色列表
export function listUserRole(query) {
  return request({
    url: '/stuManage/userRole/list',
    method: 'get',
    params: query
  })
}

// 查询用户角色详细
export function getUserRole(id) {
  return request({
    url: '/stuManage/userRole/' + id,
    method: 'get'
  })
}


// 查询用户角色详细
export function getUserRoleByUserId(userId) {
  return request({
    url: '/stuManage/userRole/getUserRoleByUserId/' + userId,
    method: 'get'
  })
}


// 新增用户角色
export function addUserRole(data) {
  return request({
    url: '/stuManage/userRole',
    method: 'post',
    data: data
  })
}

// 修改用户角色
export function updateUserRole(data) {
  return request({
    url: '/stuManage/userRole',
    method: 'put',
    data: data
  })
}

// 删除用户角色
export function delUserRole(id) {
  return request({
    url: '/stuManage/userRole/' + id,
    method: 'delete'
  })
}
